package com.example.end.search;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.*;
public class MainActivity extends Activity implements OnClickListener {
    private EditText etdata;
    private Button btnsearch;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        etdata=(EditText)findViewById(R.id.etdata);
        btnsearch=(Button)findViewById(R.id.btncall);
        btnsearch.setOnClickListener(this);
    }
    @Override
    public void onClick(View v) {
        onSearchRequested();
    }

    public boolean onSearchRequested(){
        String text=etdata.getText().toString();
        Bundle bundle=new Bundle();
        bundle.putString("data", text);
        startSearch("helloyj", false, bundle, false);
        return true;
    }
    @Override
    public boolean onCreateOptionsMenu(Menu menu)
    {
        getMenuInflater().inflate(R.menu.menu, menu);
        return true;
    }
}